#include "widget.h"
#include "ui_widget.h"

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);

    QPushButton *button = new QPushButton(this);

    connect(button, &QPushButton::clicked, this, &Widget::HandleSignal1);
    connect(button, &QPushButton::clicked, this, &Widget::HandleSignal2);
    connect(button, &QPushButton::clicked, this, &Widget::HandleSignal3);
    connect(button, &QPushButton::clicked, this, &Widget::HandleSignal4);
}

Widget::~Widget()
{
    delete ui;
}

void Widget::HandleSignal1()
{
    qDebug() << "HandleSignal1() 被执行";
}

void Widget::HandleSignal2()
{
    qDebug() << "HandleSignal2() 被执行";
}

void Widget::HandleSignal3()
{
    qDebug() << "HandleSignal3() 被执行";
}

void Widget::HandleSignal4()
{
    qDebug() << "HandleSignal4() 被执行";
}

